<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>欢迎登录文件管理系统</title>


		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<%-- <script language="JavaScript" src="js/jquery.js"></script> --%>
		<script src="js/cloud.js" type="text/javascript"></script>
		<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
	    <script type="text/javascript" src="<%= basePath%>validate/jquery-validation-1.14.0/dist/jquery.validate.js"></script>
	    <script type="text/javascript" src="<%= basePath%>validate/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
        
        <link href="css/home.css?v=2" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/jquery-1.7.2.js"></script>
        
        
<script>
	var __links = document.querySelectorAll('a');
	function __linkClick(e) {
		parent.window.postMessage(this.href, '*');
	};
	for ( var i = 0, l = __links.length; i < l; i++) {
		if (__links[i].getAttribute('data-t') == '_blank') {
			__links[i].addEventListener('click', __linkClick, false);
		}
	}
</script>
<script>
	$(document).ready(function(c) {
		$('.alert-close').on('click', function(c) {
			$('.message').fadeOut('slow', function(c) {
				$('.message').remove();
			});
		});
	});
</script>

<script type="text/javascript">
window.onload=function(){
    var oForm=document.getElementsByTagName('form')[0];
    var oBtn=document.getElementById('js-mail_btn');  
    oBtn.onclick=function(){
        oForm.submit();
    }
}
</script>


</head>
<body>
<div class="wrap">
  <div class="banner-show" id="js_ban_content">
    <div class="cell bns-01">
      <div class="con"> </div>
    </div>
    <div class="cell bns-02" style="display:none;">
      <div class="con"> <a href="http://www.js-css.cn" target="_blank" class="banner-link"> <i>圈子</i></a> </div>
    </div>
    <div class="cell bns-03" style="display:none;">
      <div class="con"> <a href="http://www.js-css.cn" target="_blank" class="banner-link"> <i>企业云</i></a> </div>
    </div>
  </div>
  <div class="banner-control" id="js_ban_button_box"> <a href="javascript:;" class="left">左</a> <a href="javascript:;" class="right">右</a> </div>
  <script type="text/javascript">
                ;(function(){
                    
                    var defaultInd = 0;
                    var list = $('#js_ban_content').children();
                    var count = 0;
                    var change = function(newInd, callback){
                        if(count) return;
                        count = 2;
                        $(list[defaultInd]).fadeOut(400, function(){
                            count--;
                            if(count <= 0){
                                if(start.timer) window.clearTimeout(start.timer);
                                callback && callback();
                            }
                        });
                        $(list[newInd]).fadeIn(400, function(){
                            defaultInd = newInd;
                            count--;
                            if(count <= 0){
                                if(start.timer) window.clearTimeout(start.timer);
                                callback && callback();
                            }
                        });
                    }
                    
                    var next = function(callback){
                        var newInd = defaultInd + 1;
                        if(newInd >= list.length){
                            newInd = 0;
                        }
                        change(newInd, callback);
                    }
                    
                    var start = function(){
                        if(start.timer) window.clearTimeout(start.timer);
                        start.timer = window.setTimeout(function(){
                            next(function(){
                                start();
                            });
                        }, 8000);
                    }
                    
                    start();
                    
                    $('#js_ban_button_box').on('click', 'a', function(){
                        var btn = $(this);
                        if(btn.hasClass('right')){
                            //next
                            next(function(){
                                start();
                            });
                        }
                        else{
                            //prev
                            var newInd = defaultInd - 1;
                            if(newInd < 0){
                                newInd = list.length - 1;
                            }
                            change(newInd, function(){
                                start();
                            });
                        }
                        return false;
                    });
                    
                })();
            </script>
  <div class="container">
    <div class="register-box">
      <div class="reg-slogan"> 用户登录</div>
      <div class="reg-form" id="js-form-mobile"> <br>
        <br>
       <form id="myform" action="<%=basePath%>/loginServlet" method="post">
        
        <div class="cell">
         
          <input type="text"  name="username" id="js-mobile_ipt" class="text" placeholder="请输入用户名"  />
        </div>
        <div class="cell">
        
          <input type="password"   name="password" id="js-mobile_pwd_ipt" class="text" placeholder="请输入密码"  />
          </div>
        <div class="bottom"> <a id="js-mail_btn" class="button btn-green"> 登录</a></div>
        <br/>
         <div class="bottom"> <a href="<%=basePath%>/register.jsp" class="button btn-green"> 注册</a></div>
       </form>
      </div>
    </div>
  </div>
</div>

</body>
</html>